package com.ftw.commons.widgets

import android.app.ProgressDialog
import android.content.Context
import android.os.Bundle
import android.view.WindowManager
import com.ftw.commons.R

/**
 * Created by wenjun on 2018/11/15 0015
 */
class CustomLoadingProgreeDialog(context: Context, theme: Int) : ProgressDialog(context, theme) {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        init()
    }

    private fun init() {
        setContentView(R.layout.dialog_loading)
        val params = window!!.attributes
        params.width = WindowManager.LayoutParams.WRAP_CONTENT
        params.height = WindowManager.LayoutParams.WRAP_CONTENT
        window!!.attributes = params
    }

}
